package com.yuandian.management.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuandian.api.management.entity.ConfIpDriftOffline;
import com.yuandian.bpm.common.core.util.R;
import com.yuandian.management.service.ConfIpDriftOfflineService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 漂移IP下线表-Controller
 * @author zfsn
 * @date 2023-3-15
 */
@Api(tags = "业务系统配置-IP漂移轨迹-移除IP")
@RestController
@RequestMapping("/ipDriftOffline")
public class ConfIpDriftOfflineController {

	@Autowired
	private ConfIpDriftOfflineService confIpDriftOfflineService;

	/**
	 * 分页查询
	 *
	 * @param confIpDriftOffline 筛选条件
	 * @return 通用返回对象
	 */
	@ApiOperation(value = "分页查询", notes = "分页查询")
	@PostMapping
	@ApiImplicitParams({
			@ApiImplicitParam(name = "systemName", value = "系统名称", paramType = "body", required = true, dataType = "String"),
			@ApiImplicitParam(name = "componnetIp", value = "组件IP", paramType = "body", required = true, dataType = "Integer"),
			@ApiImplicitParam(name = "segmentName", value = "网端名称", paramType = "body", required = true, dataType = "String"),
			@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "body", required = true, dataType = "String"),
			@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "body", required = true, dataType = "String"),
			@ApiImplicitParam(name = "pageSize", value = "每页大小", paramType = "body", required = true, dataType = "Integer"),
			@ApiImplicitParam(name = "pageNum", value = "当前页数", paramType = "body", required = true, dataType = "Integer"),
	})
	public R<Page<ConfIpDriftOffline>> listPage(@RequestBody @ApiIgnore ConfIpDriftOffline confIpDriftOffline) {
		return  R.ok(confIpDriftOfflineService.listPage(confIpDriftOffline));
	}
}
